package yo.latyoo.hokage.tools.route.impl;


import yo.latyoo.hokage.tools.parameter.HO;
import yo.latyoo.hokage.tools.parameter.TriggerParam;
import yo.latyoo.hokage.tools.route.ExecutorRoute;

import java.util.List;
import java.util.Random;

public class RouteRandom implements ExecutorRoute {
    private static final Random localRandom = new Random();
    @Override
    public HO<String> execute(TriggerParam triggerParam, List<String> addressList) {
        return HO.OK(addressList.get(localRandom.nextInt(addressList.size())));
    }
}
